<!doctype html>
<html dir="ltr" lang="zh-CN">
<head>
<meta charset="utf-8">
<title><%= title %></title>
<link rel='stylesheet' href='/stylesheets/bootstrap.css' />
<style type="text/css">
body {padding:60px 0 40px}
</style>
<link href="stylesheets/bootstrap-responsive.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</a>
			<a class="brand" href="/">Microblog</a>
			<div class="nav-collapse">
				<ul class="nav">
					<li class="active"><a href="/">首页</a></li>
					<% if(locals.user){ %>
					<li><a href="/logout">登出</a></li>
					<% } else { %>
					<li><a href="/login">登录</a></li>
					<li><a href="/reg">注册</a></li>
					<% } %>

				</ul>
			</div>
		</div>
	</div>
</div>
<div id="container" class="container">
		<% if (locals.success) { %> 
		<div class="alert alert-success">
			<%= locals.success %>
		</div>
		<% } %> 
		<% if (locals.error) { %> 
		<div class="alert alert-error">
			<%= locals.error %>
		</div>
		<% } %> 
	<%- body %>

	<hr />
	<footer>
	<p><a href="http://www.byvoid.com/" target="_blank">BYVoid</a> 2012</p>
	</footer>
</div>
<script src="javascripts/jquery.js"></script>
<script src="javascripts/bootstrap.js"></script>
</body>
</html>
